package cn.lanchengkeji.datafillingsystem.mapper;

import cn.lanchengkeji.datafillingsystem.entity.Operation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 操作权限 Mapper 接口
 * </p>
 *
 * @author Yixu
 * @since 2018-11-29
 */

public interface OperationMapper extends BaseMapper<Operation> {
    List<String> selectPermissionCodesByRoles(List roles);

    // 分页查询权限记录
    List<Operation> findOperations(Page page, @Param("request") Operation operation);

    // 根据角色id获取已添加的权限
    List<Operation> selectOperationsByRoleId(Integer roleId);

}
